package com.flyco.modules.stm.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.flyco.modules.fms.vo.FmsReportVO;
import com.flyco.modules.home.vo.OrderTotalPayAmountVO;
import com.flyco.modules.oms.entity.OmsOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description: 订单管理
 * @Author: flyco
 * @Date:   2019-12-10
 * @Version: V1.0
 */
@DS("store")
@Repository
public interface StmOrderMapper extends BaseMapper<OmsOrder> {


    List<OmsOrder> getOrderPage(Page<OmsOrder> page, @Param("ew") Wrapper<OmsOrder> queryWrapper, @Param("productSn") String productSn);

    Map<String, Object> indexOrderInit();

    List<Map<String,Object>> indexOrderBar();

    List<Map<String,Object>> indexOrderMiniArea();

    List<Map<String,Object>> indexOrderRank();

    List<OrderTotalPayAmountVO> indexOrderTotalPayAmount(@Param("dayStart") Date dayStart, @Param("dayEnd") Date dayEnd);

    List<FmsReportVO> getFmsReport(@Param("dayStart") Date dayStart, @Param("dayEnd") Date dayEnd);

}
